<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米官网克隆版</title>
    <style>
        /* 基础样式 */
        body {
            font-family: "Microsoft YaHei", Arial, sans-serif;
            margin: 0;
            padding: 0;
            line-height: 1.6;
        }

        /* 头部导航 */
        header {
            background-color: #333;
            color: white;
            padding: 12px 5%;
            position: fixed;
            width: 90%;
            top: 0;
            z-index: 1000;
        }

        nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            max-width: 1200px;
            margin: 0 auto;
        }

        .logo img {
            height: 40px;
            filter: brightness(0) invert(1);
        }

        .nav-links {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .nav-links li {
            margin: 0 20px;
            position: relative;
        }

        .nav-links a {
            color: white;
            text-decoration: none;
            font-size: 16px;
            transition: color 0.3s;
        }

        .nav-links a:hover {
            color: #ff6700;
        }

        .user-actions a {
            color: white;
            text-decoration: none;
            margin-left: 25px;
            font-size: 14px;
        }

        /* 横幅轮播 */
        .banner-container {
            margin-top: 64px;
            overflow: hidden;
            position: relative;
        }

        .banner {
            width: 100%;
            height: 500px;
            background: #f5f5f5;
            display: flex;
            transition: transform 0.5s;
        }

        .banner img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            flex-shrink: 0;
        }

        /* 产品展示 */
        .products {
            padding: 40px 5%;
            background: white;
        }

        .products h2 {
            text-align: center;
            font-size: 32px;
            margin-bottom: 40px;
        }

        .product-list {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .product-item {
            background: #fff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            transition: transform 0.3s;
        }

        .product-item:hover {
            transform: translateY(-5px);
        }

        .product-item img {
            width: 100%;
            height: 250px;
            object-fit: cover;
        }

        .product-item h3 {
            margin: 15px;
            font-size: 20px;
        }

        .product-item p {
            color: #666;
            margin: 0 15px 15px;
        }

        .btn {
            display: inline-block;
            background: #ff6700;
            color: white;
            padding: 10px 25px;
            margin: 15px;
            border-radius: 4px;
            text-decoration: none;
            transition: background 0.3s;
        }

        .btn:hover {
            background: #e65c00;
        }

        /* 页脚 */
        footer {
            background: #333;
            color: white;
            padding: 40px 5%;
            margin-top: 60px;
        }

        .footer-content {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 30px;
            max-width: 1200px;
            margin: 0 auto;
        }

        .footer-section h4 {
            font-size: 18px;
            margin-bottom: 15px;
        }

        .footer-section ul {
            list-style: none;
            padding: 0;
        }

        .footer-section li {
            margin: 8px 0;
        }

        .footer-section a {
            color: #ccc;
            text-decoration: none;
            transition: color 0.3s;
        }

        .footer-section a:hover {
            color: #ff6700;
        }

        .footer-bottom {
            text-align: center;
            margin-top: 30px;
            padding-top: 20px;
            border-top: 1px solid #444;
            color: #999;
        }
    </style>
</head>
<body>
    <header>
        <nav>
            <div class="logo">
                <img src="" alt="小米Logo">
            </div>
            <ul class="nav-links">
                <li><a href="#">首页</a></li>
                <li><a href="#">手机</a></li>
                <li><a href="#">智能硬件</a></li>
                <li><a href="#">服务</a></li>
                <li><a href="#">社区</a></li>
            </ul>
            <div class="user-actions">
                <a href="#">登录</a>
                <a href="#">注册</a>
            </div>
        </nav>
    </header>

    <div class="banner-container">
        <div class="banner">
            <img src="https://picsum.photos/1600/500?random=1" alt="Banner 1">
        </div>
    </div>

    <section class="products">
        <h2>热门产品</h2>
        <div class="product-list">
            <div class="product-item">
                <img src="https://picsum.photos/300/250?random=2" alt="产品1">
                <h3>小米13 Pro</h3>
                <p>徕卡影像，巅峰性能</p>
                <a href="#" class="btn">立即购买</a>
            </div>
            <div class="product-item">
                <img src="https://picsum.photos/300/250?random=3" alt="产品2">
                <h3>小米电视6</h3>
                <p>4K超高清，智能语音</p>
                <a href="#" class="btn">立即购买</a>
            </div>
            <div class="product-item">
                <img src="https://picsum.photos/300/250?random=4" alt="产品3">
                <h3>小米笔记本Pro</h3>
                <p>OLED大师屏，专业级性能</p>
                <a href="#" class="btn">立即购买</a>
            </div>
        </div>
    </section>

    <footer>
        <div class="footer-content">
            <div class="footer-section">
                <h4>关于我们</h4>
                <ul>
                    <li><a href="#">公司简介</a></li>
                    <li><a href="#">管理层</a></li>
                    <li><a href="#">投资者关系</a></li>
                </ul>
            </div>
            <div class="footer-section">
                <h4>客户服务</h4>
                <ul>
                    <li><a href="#">在线客服</a></li>
                    <li><a href="#">售后服务</a></li>
                    <li><a href="#">常见问题</a></li>
                </ul>
            </div>
            <div class="footer-section">
                <h4>关注我们</h4>
                <ul>
                    <li><a href="#">微博</a></li>
                    <li><a href="#">微信</a></li>
                    <li><a href="#">抖音</a></li>
                </ul>
            </div>
        </div>
        <div class="footer-bottom">
            <p>© 2023 小米公司 | 京ICP备12345678号</p>
        </div>
    </footer>

    <script>
        // 自动轮播功能
        let currentBanner = 0;
        const banners = [
            'https://picsum.photos/1600/500?random=1',
            'https://picsum.photos/1600/500?random=5',
            'https://picsum.photos/1600/500?random=6'
        ];

        function changeBanner() {
            const bannerContainer = document.querySelector('.banner');
            currentBanner = (currentBanner + 1) % banners.length;
            bannerContainer.innerHTML = `<img src="${banners[currentBanner]}" alt="Banner ${currentBanner + 1}">`;
        }

        // 每5秒切换一次
        setInterval(changeBanner, 5000);

        // 导航栏滚动效果
        window.addEventListener('scroll', () => {
            const header = document.querySelector('header');
            if (window.scrollY > 100) {
                header.style.backgroundColor = 'rgba(51, 51, 51, 0.9)';
            } else {
                header.style.backgroundColor = '#333';
            }
        });

        // 产品卡片悬停效果
        document.querySelectorAll('.product-item').forEach(item => {
            item.addEventListener('mouseover', () => {
                item.style.transform = 'translateY(-5px)';
            });
            item.addEventListener('mouseout', () => {
                item.style.transform = 'translateY(0)';
            });
        });
    </script>
</body>
</html>